
<#include "/common/head.html"/>

 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
        <table class="table1">
        	<tr >
        		<th><span>盘点单名：</span></th>
               	<td colspan="4">
               		<input class="easyui-textbox" type="text" name="pd_name" value="${pd_name!''}" data-options="" style="width:70%"></input> 
               		           		
           		</td>
        	</tr>
            <tr>
           		<th><span>盘点单号：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="pd_no" value="" data-options=""></input>
           		</td>
           		<th><span>盘点时间：</span></th>
               	<td>
               		<input class="easyui-datebox" type="text" name="pd_time" value="" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>盘点人：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="pd_user" value="${session['sysUser'].user_name}" data-options="readonly:true"></input>
           		</td>
           		<th><span>盘点类型：</span></th>
               	<td>
	            	<input class="easyui-combobox" id="pd_type" name="pd_type" value="" data-options="
	            				valueField: 'id',
   								textField: 'text',
	            				data: [
	            					{id:'', text:''}<#list dictDatapd_type.keySet() as key>,{id:'${key}', text:'${dictDatapd_type.get(key)}'}</#list>
	            				],
	            				required:true
	            				
	            	" />        	
           		</td>
            </tr>     
             <tr>
           		<th><span>仓库编号：</span></th>
               	<td colspan="4">
	            	<input class="easyui-combobox" id="storage_no" name="storage_no" value="" data-options="
	            				valueField: 'id',
   								textField: 'text',
	            				data: [
	            					{id:'', text:''}<#list dictDatastorage_no.keySet() as key>,{id:'${key}', text:'${dictDatastorage_no.get(key)}'}</#list>
	            				]
	            				
	            	" />        	
           		</td>           		
            </tr>                  
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#ff").form('enableValidation').form('validate')) {
		$.post("add", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {
	     
       	    "model.pd_no": $(":input[name='pd_no']").val(), 
       	    "model.pd_time": $(":input[name='pd_time']").val(), 
       	    "model.pd_user": $(":input[name='pd_user']").val(), 
       	    "model.pd_type": $(":input[name='pd_type']").val(), 
       	    "model.storage_no": $(":input[name='storage_no']").val(), 
       	    "model.pd_name": $(":input[name='pd_name']").val(), 
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
